/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.giant.views;

import com.giant.entities.InShipment;
import java.io.Serializable;
import java.util.Date;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.OneToOne;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;
import javax.xml.bind.annotation.XmlRootElement;

/**
 *
 * @author taticay
 */
@Entity
@Table(name = "in_order_v")
@XmlRootElement
@NamedQueries({
    @NamedQuery(name = "InOrderV.findAll", query = "SELECT i FROM InOrderV i"),
    @NamedQuery(name = "InOrderV.findByIdOrder", query = "SELECT i FROM InOrderV i WHERE i.idOrder = :idOrder"),
    @NamedQuery(name = "InOrderV.findByIdPos", query = "SELECT i FROM InOrderV i WHERE i.idPos = :idPos"),
    @NamedQuery(name = "InOrderV.findByIdPerson", query = "SELECT i FROM InOrderV i WHERE i.idPerson = :idPerson"),
    @NamedQuery(name = "InOrderV.findByIdUser", query = "SELECT i FROM InOrderV i WHERE i.idUser = :idUser"),
    @NamedQuery(name = "InOrderV.findByNumDoc", query = "SELECT i FROM InOrderV i WHERE i.numDoc = :numDoc"),
    @NamedQuery(name = "InOrderV.findByDateOrder", query = "SELECT i FROM InOrderV i WHERE i.dateOrder = :dateOrder"),
    @NamedQuery(name = "InOrderV.findByIdShipment", query = "SELECT i FROM InOrderV i WHERE i.idShipment = :idShipment"),
    @NamedQuery(name = "InOrderV.findByPayment", query = "SELECT i FROM InOrderV i WHERE i.payment = :payment"),
    @NamedQuery(name = "InOrderV.findByStatus", query = "SELECT i FROM InOrderV i WHERE i.status = :status"),
    @NamedQuery(name = "InOrderV.findByAnnuled", query = "SELECT i FROM InOrderV i WHERE i.annuled = :annuled"),
    @NamedQuery(name = "InOrderV.findByDateAnnuled", query = "SELECT i FROM InOrderV i WHERE i.dateAnnuled = :dateAnnuled"),
    @NamedQuery(name = "InOrderV.findByReasonAnnu", query = "SELECT i FROM InOrderV i WHERE i.reasonAnnu = :reasonAnnu"),
    @NamedQuery(name = "InOrderV.findByIdUserAnnu", query = "SELECT i FROM InOrderV i WHERE i.idUserAnnu = :idUserAnnu"),
    @NamedQuery(name = "InOrderV.findByObservations", query = "SELECT i FROM InOrderV i WHERE i.observations = :observations"),
    @NamedQuery(name = "InOrderV.findByTotalItems", query = "SELECT i FROM InOrderV i WHERE i.totalItems = :totalItems"),
    @NamedQuery(name = "InOrderV.findByTotal", query = "SELECT i FROM InOrderV i WHERE i.total = :total")})
public class InOrderV implements Serializable {
    private static final long serialVersionUID = 1L;
    @Basic(optional = false)
    @NotNull
    @Id
    @Column(name = "id_order")
    private int idOrder;
    @Basic(optional = false)
    @NotNull
    @Column(name = "id_pos")
    private int idPos;
    @Basic(optional = false)
    @NotNull
    @Column(name = "id_person")
    private int idPerson;
    @Basic(optional = false)
    @NotNull
    @Column(name = "id_user")
    private int idUser;
    @Basic(optional = false)
    @NotNull
    @Size(min = 1, max = 100)
    @Column(name = "num_doc")
    private String numDoc;
    @Basic(optional = false)
    @NotNull
    @Column(name = "date_order")
    @Temporal(TemporalType.DATE)
    private Date dateOrder;
     @OneToOne
    @JoinColumn(name = "id_shipment")
    private InShipment idShipment;
    @Basic(optional = false)
    @NotNull
    @Column(name = "payment")
    private boolean payment;
    @Basic(optional = false)
    @NotNull
    @Column(name = "status")
    private boolean status;
    @Basic(optional = false)
    @NotNull
    @Column(name = "annuled")
    private boolean annuled;
    @Column(name = "date_annuled")
    @Temporal(TemporalType.DATE)
    private Date dateAnnuled;
    @Size(max = 250)
    @Column(name = "reason_annu")
    private String reasonAnnu;
    @Column(name = "id_user_annu")
    private Integer idUserAnnu;
    @Basic(optional = false)
    @NotNull
    @Size(min = 1, max = 500)
    @Column(name = "observations")
    private String observations;
    @Basic(optional = false)
    @NotNull
    @Column(name = "total_items")
    private long totalItems;
    // @Max(value=?)  @Min(value=?)//if you know range of your decimal fields consider using these annotations to enforce field validation
    @Column(name = "total")
    private Double total;

    public InOrderV() {
    }

    public int getIdOrder() {
        return idOrder;
    }

    public void setIdOrder(int idOrder) {
        this.idOrder = idOrder;
    }

    public int getIdPos() {
        return idPos;
    }

    public void setIdPos(int idPos) {
        this.idPos = idPos;
    }

    public int getIdPerson() {
        return idPerson;
    }

    public void setIdPerson(int idPerson) {
        this.idPerson = idPerson;
    }

    public String getNumDoc() {
        return numDoc;
    }

    public void setNumDoc(String numDoc) {
        this.numDoc = numDoc;
    }

    public Date getDateOrder() {
        return dateOrder;
    }

    public void setDateOrder(Date dateOrder) {
        this.dateOrder = dateOrder;
    }

   

    public boolean getStatus() {
        return status;
    }

    public void setStatus(boolean status) {
        this.status = status;
    }

    public boolean getAnnuled() {
        return annuled;
    }

    public void setAnnuled(boolean annuled) {
        this.annuled = annuled;
    }

    public Date getDateAnnuled() {
        return dateAnnuled;
    }

    public void setDateAnnuled(Date dateAnnuled) {
        this.dateAnnuled = dateAnnuled;
    }

    public String getReasonAnnu() {
        return reasonAnnu;
    }

    public void setReasonAnnu(String reasonAnnu) {
        this.reasonAnnu = reasonAnnu;
    }

    public Integer getIdUserAnnu() {
        return idUserAnnu;
    }

    public void setIdPersonAnnu(Integer idUserAnnu) {
        this.idUserAnnu = idUserAnnu;
    }

    public String getObservations() {
        return observations;
    }

    public void setObservations(String observations) {
        this.observations = observations;
    }

    public long getTotalItems() {
        return totalItems;
    }

    public void setTotalItems(long totalItems) {
        this.totalItems = totalItems;
    }

    public Double getTotal() {
        return total;
    }

    public void setTotal(Double total) {
        this.total = total;
    }
       public InShipment getIdShipment() {
        return idShipment;
    }

    public void setIdShipment(InShipment idShipment) {
        this.idShipment = idShipment;
    }

    public boolean isPayment() {
        return payment;
    }

    public void setPayment(boolean payment) {
        this.payment = payment;
    }

    public int getIdUser() {
        return idUser;
    }

    public void setIdUser(int idUser) {
        this.idUser = idUser;
    }
    
}
